<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <head><title></title></head>
    <body>
        <ui:composition>
            <h:panelGrid columns="1" rendered="#{facesContext.externalContext.remoteUser != null}">
                <h:outputFormat value="#{bundle.UserHello}">
                    <f:param value="#{facesContext.externalContext.remoteUser}"/>
                </h:outputFormat>
                <h:form>
                    <h:commandLink action="#{basketBean.prepareOrder()}" value="#{bundle.Basket} #{basketBean.price}" 
                                   rendered="#{basketBean.flgOrder and userRights.client}"/>
                </h:form>
                <h:form>
                    <h:commandButton action="#{personsController.logOut()}" value="#{bundle.Logout}"/>
                </h:form>
            </h:panelGrid>
            <h:panelGrid columns="1" rendered="#{facesContext.externalContext.remoteUser == null}">
                <h:button style="width: 70px" outcome="/login/login.xhtml" value="#{bundle.Login}"/>
                <h:button style="width: 70px" outcome="/login/register.xhtml" value="#{bundle.Register}"/>
            </h:panelGrid>
        </ui:composition>
    </body>
</html>
